<{include file='db:smartsection_header.html'}>

<{if $collapsable_heading == 1}>
	<script type="text/javascript"><!--
	function goto_URL(object)
	{
		window.location.href = object.options[object.selectedIndex].value;
	}
	
	function toggle(id)
	{
		if (document.getElementById) { obj = document.getElementById(id); }
		if (document.all) { obj = document.all[id]; }
		if (document.layers) { obj = document.layers[id]; }
		if (obj) {
			if (obj.style.display == "none") {
				obj.style.display = "";
			} else {
				obj.style.display = "none";
			}
		}
		return false;
	}
	
	var iconClose = new Image();
	iconClose.src = 'images/icon/close12.gif';
	var iconOpen = new Image();
	iconOpen.src = 'images/icon/open12.gif';
	
	function toggleIcon ( iconName )
	{
		if ( document.images[iconName].src == window.iconOpen.src ) {
			document.images[iconName].src = window.iconClose.src;
		} else if ( document.images[iconName].src == window.iconClose.src ) {
			document.images[iconName].src = window.iconOpen.src;
		}
		return;
	}
	
	//-->
	</script>
<{/if}>
<{if $displayList == 1}>
	<{if $lang_mainintro != ''}>
		<span class="smartsection_infotext"><{$lang_mainintro}></span>	
	<{/if}>
		
	<{if $collapsable_heading == 1}>
		<div class="smartsection_collaps_title"><a href='javascript:;' onclick="toggle('toptable'); toggleIcon('toptableicon')";><img id='toptableicon' src='<{$xoops_url}>/modules/smartsection/images/icon/close12.gif' alt='' /></a>&nbsp;<{$lang_categories_summary}></div>
		<div id='toptable'>
		<span class="smartsection_collaps_info"><{$lang_categories_summary_info}></span>

	<!-- Content under the collapsable bar //-->
	<{/if}>
	
	<{if !$collapsable_heading && !$lang_mainintro}>
	<{/if}>
	
		<div align="right"><{$catnavbar}></div>
		<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center" class = "outer">
  			<tr> 
    			<td align="left" class="itemHead"><b><{$lang_category_column}></b></td>
    			<td align="center" width="50px" class="itemHead"><b><{$lang_items}></b></td>
    			<{if $displaylastitem == 1}>
    				<td align="right" width="40%" class="itemHead"><b><{$lang_last_smartsection}></b></td>
    			<{/if}>
  			</tr>
		<!-- Start categories loop -->
			<{foreach item=category from=$categories}>
  				<tr> 
    				<td valign="middle" class="even" align="left">
    					<div class = "smartsection_list">
    						<{if $isAdmin == 1}>
    							<a href="<{$xoops_url}>/modules/smartsection/admin/category.php?op=mod&categoryid=<{$category.categoryid}>"><img src="<{$xoops_url}>/modules/smartsection/images/icon/cat.gif" title="<{$lang_editcategory}>" alt="<{$lang_editcategory}>"/></a>&nbsp;<b><{$category.categorylink}></b>
    						<{else}>
								<img src="<{$xoops_url}>/modules/smartsection/images/icon/cat.gif" alt="" />&nbsp;<b><{$category.categorylink}></b>    		
    						<{/if}>

    						 <br />
    						<span class="smartsection_category_dsc"><{$category.description}></span>
    					</div>
    				</td>
    				<td valign="middle" class="even" align="center"><{$category.total}></td>
    				<{if $displaylastitem == 1}>
    					<td valign="middle" class="even" align="right"><{$category.last_title_link}></td>
    				<{/if}>
  				</tr>
  				
				<{if $show_subcats}>
	  				<{foreach item=subcat from=$category.subcats}>
  						<tr> 
	  						<td valign="middle" class="odd" align="left">
	  							<div style="padding-left: 10px;">
	  								<{if $isAdmin == 1}>
	  									<a href="<{$xoops_url}>/modules/smartsection/admin/category.php?op=mod&categoryid=<{$subcat.categoryid}>"><img src="<{$xoops_url}>/modules/smartsection/images/icon/subcat.gif" title="<{$lang_editcategory}>" alt="<{$lang_editcategory}>" alt="<{$lang_editcategory}>"/></a>&nbsp;<{$subcat.categorylink}>
  									<{else}>
		  								<img src="<{$xoops_url}>/modules/smartsection/images/icon/subcat.gif" title="<{$lang_editcategory}>" alt="<{$lang_editcategory}>"/>&nbsp;<{$subcat.categorylink}>
    								<{/if}>
    								<{if $displaysubcatdsc == 1}>
    									<span class="smartsection_category_dsc"><{$subcat.description}></span>
    								<{/if}>
    							</div>
    						</td>
    						<td valign="middle" class="odd" align="center"><{$subcat.total}></td>
    						<{if $displaylastitem == 1}>
    							<td valign="middle" class="odd" align="right"><{$subcat.last_title_link}></td>
    						<{/if}>
  						</tr>
   					<{/foreach}>  		
  				<{/if}>
  			<{/foreach}>
		<!-- End categories loop -->
  			<tr> 
  			</tr>
		</table>
		<div align="right"><{$catnavbar}></div>
		<{if $collapsable_heading == 1}>
			</div>
		<{/if}>
		<br />
		<{if $indexfooter}>
  			<div class="ss_indexfooter"><{$indexfooter}></div>
		<{/if}>

		<{if $displaylastitems == 1}>
			<{if $collapsable_heading == 1}>
				<div class="smartsection_collaps_title"><a href='javascript:;' onclick="toggle('bottomtable'); toggleIcon('bottomtableicon')";><img id='bottomtableicon' src='<{$xoops_url}>/modules/smartsection/images/icon/close12.gif' alt='' /></a>&nbsp;<{$lang_index_items}></div>
				<div id='bottomtable'>
					<span class="smartsection_collaps_info"><{$lang_index_items_info}></span>
			<!-- Content under the collapsable bar //-->
			<{/if}>
			<div align="right"><{$navbar}></div>

			<{if $displayFull == 1}>
			<!-- Start item loop -->
				<{foreach item=item from=$items}> 
				  <{include file="db:smartsection_singleitem.html" item=$item}>
    			<{/foreach}> 
		  <!-- End item loop -->
			<{else}>
				<table border="0" width="90%" cellspacing="0" cellpadding="0" align="center" class= "outer">
		  			<tr> 
	    				<td align="left" class="itemHead" width='65%'><b><{$lang_item}></b></td>
						<{if $display_date_col == 1}>
	    					<td align="center" class="itemHead" width="25%"><b><{$lang_datesub}></b></td>
	    				<{/if}>
						<{if $display_hits_col == 1}>
	    					<td align="center" class="itemHead" width="10%"><b><{$lang_hits}></b></td>
	    				<{/if}>
		  			</tr>
  			<!-- Start item loop -->
  					<{foreach item=item from=$items}> 
  						<tr valign="top"> 
	    					<td class ="odd"><div class ="smartsection_list" align="left"><li><{$item.titlelink}></li></div></td>
							
	    					<{if $display_date_col == 1}>
	    						<td class="odd" align="left"><div class ="smartsection_list" align="center"><{$item.datesub}></div></td>
	    					<{/if}>
	    					
	    					<{if $display_hits_col == 1}>
								<td class="odd" align="left"><div class ="smartsection_list" align="center"><{$item.counter}></div></td>
							<{/if}>
				
						</tr>	
  					<{/foreach}> 
			<!-- End item loop -->
  					<tr> 
					</tr>
				</table>
			<{/if}>

			<div align="right"><{$navbar}></div>
			<{if $collapsable_heading == 1}>
				</div>
			<{/if}>
		<{/if}>
<{else}>
	<{if $lang_mainintro != ''}>
		<span class="smartsection_infotext"><{$lang_mainintro}></span>	
	<{/if}>
		
	<{if $collapsable_heading == 1}>
		<div class="smartsection_collaps_title"><a href='javascript:;' onclick="toggle('toptable'); toggleIcon('toptableicon')";><img id='toptableicon' src='<{$xoops_url}>/modules/smartsection/images/icon/close12.gif' alt='' /></a>&nbsp;<{$lang_categories_summary}></div>
		<div id='toptable'>
			<span class="smartsection_collaps_info"><{$lang_categories_summary_info}></span>

	<!-- Content under the collapsable bar //-->
	<{/if}>
	
	<{if !$collapsable_heading && !$lang_mainintro}>
	<{/if}>
	
	<div align="right"><{$catnavbar}></div>
	<table border="0" width="90%" cellspacing="1" cellpadding="0" align="center" class = "outer">
  		<tr> 
    		<td align="left" class="itemHead"><b><{$lang_category_column}></b></td>
    		<td align="center" width="50px" class="itemHead"><b><{$lang_items}></b></td>
    		<{if $displaylastitem == 1}>
    			<td align="right" width="40%" class="itemHead"><b><{$lang_last_smartsection}></b></td>
    		<{/if}>
  		</tr>
		<!-- Start categories loop -->
		<{foreach item=category from=$categories}>
  			<tr> 
    			<td valign="middle" class="even" align="left">
    			<{if $isAdmin == 1}>
    				<a href="<{$xoops_url}>/modules/smartsection/admin/category.php?op=mod&categoryid=<{$category.categoryid}>"><img src="<{$xoops_url}>/modules/smartsection/images/icon/cat.gif" title="<{$lang_editcategory}>" alt="<{$lang_editcategory}>"/></a>&nbsp;<b><{$category.categorylink}></b>
    			<{else}>
					<img src="<{$xoops_url}>/modules/smartsection/images/icon/cat.gif" alt="" />&nbsp;<b><{$category.categorylink}></b>    		
    			<{/if}>

    			 <br />
    			<span class="smartsection_category_dsc"><{$category.description}></span>
    			</td>
   		 		<td valign="middle" class="even" align="center"><{$category.total}></td>
    			<{if $displaylastitem == 1}>
    				<td valign="middle" class="even" align="right"><{$category.last_title_link}></td>
    			<{/if}>
  			</tr>
			<{if $show_subcats}>
		  		<{foreach item=subcat from=$category.subcats}>
  					<tr> 
	  					<td valign="middle" class="odd" align="left">
	  						<div style="padding-left: 10px;">
	  							<{if $isAdmin == 1}>
	 	 							<a href="<{$xoops_url}>/modules/smartsection/admin/category.php?op=mod&categoryid=<{$subcat.categoryid}>"><img src="<{$xoops_url}>/modules/smartsection/images/icon/subcat.gif" title="<{$lang_editcategory}>" alt="<{$lang_editcategory}>" alt="<{$lang_editcategory}>"/></a>&nbsp;<{$subcat.categorylink}>
  								<{else}>
			  						<img src="<{$xoops_url}>/modules/smartsection/images/icon/subcat.gif" title="<{$lang_editcategory}>" alt="<{$lang_editcategory}>"/>&nbsp;<{$subcat.categorylink}>
    							<{/if}>
    							<{if $displaysubcatdsc == 1}>
    								<span class="smartsection_category_dsc"><{$subcat.description}></span>
    							<{/if}>
    						</div>
    					</td>
    					<td valign="middle" class="odd" align="center"><{$subcat.total}></td>
    					<{if $displaylastitem == 1}>
    						<td valign="middle" class="odd" align="right"><{$subcat.last_title_link}></td>
    					<{/if}>
  					</tr>
   				<{/foreach}>  		
  			<{/if}>
  		<{/foreach}>
		<!-- End categories loop -->
  		<tr> 
  		</tr>
	</table>
		<div align="right"><{$catnavbar}></div>
		<{if $collapsable_heading == 1}>
		</div>
		<{/if}>
		<br />
		<{if $indexfooter}>
 	 		<div class="ss_indexfooter"><{$indexfooter}></div>
		<{/if}>

		<{if $displaylastitems == 1}>
			<{if $collapsable_heading == 1}>
				<div class="smartsection_collaps_title"><a href='javascript:;' onclick="toggle('bottomtable'); toggleIcon('bottomtableicon')";><img id='bottomtableicon' src='<{$xoops_url}>/modules/smartsection/images/icon/close12.gif' alt='' /></a>&nbsp;<{$lang_index_items}></div>
				<div id='bottomtable'>
					<span class="smartsection_collaps_info"><{$lang_index_items_info}></span>
		<!-- Content under the collapsable bar //-->
			<{/if}>
			<div align="right"><{$navbar}></div>

			<{if $displayFull == 1}>
			<!-- Start item loop -->
				<{foreach item=item from=$items}> 
				  <{include file="db:smartsection_singleitem.html" item=$item}>
    			<{/foreach}> 
		  <!-- End item loop -->
			<{else}>
				<table border="0" width="90%" cellspacing="1" cellpadding="3" align="center" class= "outer">
			  		<tr> 
		  	  			<td align="left" class="itemHead" width='65%'><b><{$lang_item}></b></td>
						<{if $display_date_col == 1}>
	 		   				<td align="center" class="itemHead" width="25%"><b><{$lang_datesub}></b></td>
		    			<{/if}>
						<{if $display_hits_col == 1}>
		    				<td align="center" class="itemHead" width="10%"><b><{$lang_hits}></b></td>
		    			<{/if}>
			 	 	</tr>
  			<!-- Start item loop -->
 	 			<{foreach item=item from=$items}> 
  					<tr valign="top"> 
	  	  				<td class="even" align="left"><{$item.titlelink}></b></td>
						<{if $display_date_col == 1}>
	  		  				<td class="odd" align="left"><div align="center" valign="middle"><{$item.datesub}></div></td>
	  		  			<{/if}>
						<{if $display_hits_col == 1}>
	 		   				<td class="odd" align="left"><div align="center"><{$item.counter}></div></td>
		    			<{/if}>
					</tr>
  				<{/foreach}> 
			<!-- End item loop -->
  				<tr> 
				</tr>
			</table>
		<{/if}>

		<div align="right"><{$navbar}></div>
		<{if $collapsable_heading == 1}>
			</div>
		<{/if}>
	<{/if}>
<{/if}>
	
	<{if $isAdmin == 1}>
  		<div class="smartsection_adminlinks"><{$smartsection_adminpage}></div>
	<{/if}>
	

<{include file='db:system_notification_select.html'}>